package ProxyTest;
/**
* 
* @ClassName: CallBackQueue
* @Description: TODO(回调队列模拟)
* @author hsj
* @email 2356899074@qq.com
* @date 2019年6月25日
*
*/

public class CallBackQueue{
	private CallbackInterface callbackInterface;

	public CallBackQueue() {
		super();
	}
	
	public void enqueue(CallbackInterface callbackInterface){
		this.callbackInterface = callbackInterface;
	}
	
	@SuppressWarnings("unused")
	public void callBackExecuteResponse(String successResponce){
		if(callbackInterface != null){
			callbackInterface.onResponse(successResponce);
		}
	}
	
	public void callBackExecuteFailure(String fialResponce){
		if(callbackInterface != null){
			callbackInterface.onFailure(fialResponce);
		}
	}
}
